package com.cuixichang.minimalism.transfer.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.util.Assert;
import com.cuixichang.minimalism.basal.core.BaseDTO;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
 * 系统菜单表对象实体
 *
 * @author cuixichang
 * @date 2024-12-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class IMenuDTO extends BaseDTO{
   /**
    * 关联关系id
    */
    @JsonSerialize(using= ToStringSerializer.class)
    private Long parentId;
   /**
    * 菜单名称
    */
    private String menuName;
   /**
    * 菜单别名
    */
    private String menuAlias;
   /**
    * 菜单描述
    */
    private String menuDescribed;
   /**
    * 菜单引用地址
    */
    private String menuUrl;
   /**
    * 菜单使用图标
    */
    private String menuIcon;
   /**
    * 菜单分组标识
    */
    private String menuGroupSignboard;
   /**
    * 系统编码
    */
    private String createSystemCode;

    @Override
    public void check() {
        Assert.hasText(menuName,"菜单名称不能为空");
        Assert.hasText(menuAlias,"菜单别名不能为空");
        Assert.hasText(createSystemCode,"系统编码不能为空");
    }
}
